Component({
    data: {
      selected: 0,
      color: "#999999",
      selectedColor: "#33613A",
      list: [{
        pagePath: "/pages/home/home",
        iconPath: "/images/tab/home.png",
        selectedIconPath: "/images/tab/home_s.png",
        text: "首页"
      }, {
        pagePath: "/pages/mine/mine",
        iconPath: "/images/tab/mine.png",
        selectedIconPath: "/images/tab/mine_s.png",
        text: "我的"
      }]
    },
    attached() {
      
    },
    methods: {
      switchTab(e) {
        const data = e.currentTarget.dataset
        const url = data.path
        wx.switchTab({url})
        this.setData({
          selected: data.index
        })
      }
    }
  })